// ShapeScript document /// Solar Capacitor — 9V /// Defiantware, LLC //////////////////////////////////////////////////////////////// camera { position -28.814 44.8772 -23.3376 orientation 0.995 0.2854 -0.7316 width 705 height 592 } detail 111 rotate 0 0 -0.5 /// CAD mode //////////////////////////////////////////////////////////////// define GAP 0.15 /// mm define SHOW_GHOSTS false /// boolean /// Body define BATTERY_CASE_LENGTH 45.3 /// mm ( 0.0 min, 46.4 max) define BATTERY_CASE_WIDTH 25.76 /// mm (24.5 min, 26.5 max) define BATTERY_CASE_THICKNESS 16.90 /// mm (15.5 min, 17.5 max) define BATTERY_CASE_WALL_THICKNESS 0.6 /// mm define BATTERY_CASE_EDGE_RADIUS 0.7 /// mm /// Terminals define TERMINALS_PLATFORM_LENGTH 15.95 /// mm define TERMINALS_PLATFORM_WIDTH 24.55 /// mm define TERMINALS_PLATFORM_THICKNESS 1.30 /// mm /// Photovoltaic cell define PHOTOVOLTAIC_CELL { /// length (mm), width (mm), thickness (mm) (8.15 * 5) 23.15 1.8 /// ANYSOLAR KXOB25-05X3F-TR 1.67V 18.4mA (connected in series of 5, 8.35V) // (8.15 * 4) 23.15 1.8 /// ANYSOLAR KXOB25-05X3F-TR 1.67V 18.4mA (connected in series of 4, 6.68V) // (7 * 5) 22 1.8 /// ANYSOLAR KXOB25-04X3F-TR 1.67V 13.2mA (connected in series of 5, 8.35V) } define PHOTOVOLTAIC_CELL_LENGTH PHOTOVOLTAIC_CELL[0] /// mm define PHOTOVOLTAIC_CELL_WIDTH PHOTOVOLTAIC_CELL[1] /// mm define PHOTOVOLTAIC_CELL_THICKNESS PHOTOVOLTAIC_CELL[2] /// mm define PHOTOVOLTAIC_CELL_COUNT 2 define PHOTOVOLTAIC_WIRE_THICKNESS 1.0 /// mm /// Capacior define CAPACITOR { /// length (mm), diameter (mm) 40.60 10.30 /// Eaton HS1040-3R8157-R 3.8V 150F (connected in series of 2, 7.6V) } define CAPACITOR_LENGTH CAPACITOR[0] /// mm define CAPACITOR_DIAMETER CAPACITOR[1] /// mm //////////////////////////////////////////////////////////////// define box { option edge_radius 0 option width 1 option height 1 option depth 1 if edge_radius > 0 { union { cube { size (width) (depth - edge_radius * 2) (height - edge_radius * 2) } cube { size (width - edge_radius * 2) (depth) (height - edge_radius * 2) } cube { size (width - edge_radius * 2) (depth - edge_radius * 2) (height) } define box_corner { sphere { detail (detail / 2) size (edge_radius * 2) } } group { box_corner { position (width / 2 - edge_radius) (depth / 2 - edge_radius) } box_corner { position -(width / 2 - edge_radius) (depth / 2 - edge_radius) } box_corner { position (width / 2 - edge_radius) -(depth / 2 - edge_radius) } box_corner { position -(width / 2 - edge_radius) -(depth / 2 - edge_radius) } position 0 0 -(height / 2 - edge_radius) } group { box_corner { position (width / 2 - edge_radius) (depth / 2 - edge_radius) } box_corner { position -(width / 2 - edge_radius) (depth / 2 - edge_radius) } box_corner { position (width / 2 - edge_radius) -(depth / 2 - edge_radius) } box_corner { position -(width / 2 - edge_radius) -(depth / 2 - edge_radius) } position 0 0 (height / 2 - edge_radius) } define box_edge_vertical { cylinder { detail (detail / 2) orientation 0 0 0.5 size (edge_radius * 2) (height - edge_radius * 2) } } group { box_edge_vertical { position (width / 2 - edge_radius) (depth / 2 - edge_radius) } box_edge_vertical { position -(width / 2 - edge_radius) (depth / 2 - edge_radius) } box_edge_vertical { position (width / 2 - edge_radius) -(depth / 2 - edge_radius) } box_edge_vertical { position -(width / 2 - edge_radius) -(depth / 2 - edge_radius) } } define box_edge_saggital { cylinder { detail (detail / 2) size (edge_radius * 2) (depth - edge_radius * 2) } } group { group { box_edge_saggital { position (width / 2 - edge_radius) } box_edge_saggital { position -(width / 2 - edge_radius) } position 0 0 -(height / 2 - edge_radius) } group { box_edge_saggital { position (width / 2 - edge_radius) } box_edge_saggital { position -(width / 2 - edge_radius) } position 0 0 (height / 2 - edge_radius) } } define box_edge_horizontal { cylinder { detail (detail / 2) orientation 0.5 size (edge_radius * 2) (width - edge_radius * 2) } } group { group { box_edge_horizontal { position 0 (depth / 2 - edge_radius) } box_edge_horizontal { position 0 -(depth / 2 - edge_radius) } position 0 0 -(height / 2 - edge_radius) } group { box_edge_horizontal { position 0 (depth / 2 - edge_radius) } box_edge_horizontal { position 0 -(depth / 2 - edge_radius) } position 0 0 (height / 2 - edge_radius) } } } } else { cube { size (width) (depth) (height) } } } //////////////////////////////////////////////////////////////// define BATTERY_CASE { difference { box { width BATTERY_CASE_WIDTH height BATTERY_CASE_LENGTH depth BATTERY_CASE_THICKNESS edge_radius BATTERY_CASE_EDGE_RADIUS } /// Slot for photovoltaic cell(s) if PHOTOVOLTAIC_CELL_COUNT > 0 { cube { size (PHOTOVOLTAIC_CELL_WIDTH + GAP * 2) (PHOTOVOLTAIC_CELL_THICKNESS + GAP * 2) (PHOTOVOLTAIC_CELL_LENGTH + GAP * 2) position 0 (BATTERY_CASE_THICKNESS / 2 - (PHOTOVOLTAIC_CELL_THICKNESS + GAP) / 2) } /// Grooves for photovoltail cell terminals difference { union { cube { size ((PHOTOVOLTAIC_CELL_WIDTH + GAP * 2) / 4) (BATTERY_CASE_THICKNESS / 2) (PHOTOVOLTAIC_CELL_LENGTH + GAP * 2) position -(((PHOTOVOLTAIC_CELL_WIDTH + GAP * 2) / 4) / (2 / 3)) } cube { size ((PHOTOVOLTAIC_CELL_WIDTH + GAP * 2) / 4) (BATTERY_CASE_THICKNESS / 2) (PHOTOVOLTAIC_CELL_LENGTH + GAP * 2) position (((PHOTOVOLTAIC_CELL_WIDTH + GAP * 2) / 4) / (2 / 3)) } position 0 (BATTERY_CASE_THICKNESS / 4) } union { cylinder { orientation 0 0 0.5 size (CAPACITOR_DIAMETER + GAP * 2 + BATTERY_CASE_WALL_THICKNESS * 2) (BATTERY_CASE_LENGTH) position -(BATTERY_CASE_WIDTH / 4) } cylinder { orientation 0 0 0.5 size (CAPACITOR_DIAMETER + GAP * 2 + BATTERY_CASE_WALL_THICKNESS * 2) (BATTERY_CASE_LENGTH) position (BATTERY_CASE_WIDTH / 4) } } } /// Cutouts for photovoltaic wires define PHOTOVOLTAIC_WIRES_CUTOUTS_LENGTH { define WITHOUT_WIRE ((BATTERY_CASE_LENGTH - (PHOTOVOLTAIC_CELL_LENGTH + GAP * 2)) / 2) define WITH_WIRE (TERMINALS_PLATFORM_THICKNESS + GAP + PHOTOVOLTAIC_WIRE_THICKNESS * 2) if WITH_WIRE > WITHOUT_WIRE { WITH_WIRE } else { WITHOUT_WIRE } } union { cube { size (PHOTOVOLTAIC_WIRE_THICKNESS + GAP * 2) (BATTERY_CASE_THICKNESS / 2) (PHOTOVOLTAIC_WIRES_CUTOUTS_LENGTH) position -10 (BATTERY_CASE_THICKNESS / 4) -(BATTERY_CASE_LENGTH / 2 - PHOTOVOLTAIC_WIRES_CUTOUTS_LENGTH / 2) } cube { size (PHOTOVOLTAIC_WIRE_THICKNESS + GAP * 2) (BATTERY_CASE_THICKNESS / 2) (PHOTOVOLTAIC_WIRES_CUTOUTS_LENGTH) position 10 (BATTERY_CASE_THICKNESS / 4) -(BATTERY_CASE_LENGTH / 2 - PHOTOVOLTAIC_WIRES_CUTOUTS_LENGTH / 2) } } /// Slot for second photovoltaic cell if PHOTOVOLTAIC_CELL_COUNT > 1 { cube { size (PHOTOVOLTAIC_CELL_WIDTH + GAP * 2) (PHOTOVOLTAIC_CELL_THICKNESS + GAP * 2) (PHOTOVOLTAIC_CELL_LENGTH + GAP * 2) position 0 -(BATTERY_CASE_THICKNESS / 2 - (PHOTOVOLTAIC_CELL_THICKNESS + GAP) / 2) } /// Grooves for photovoltail cell terminals difference { union { cube { size ((PHOTOVOLTAIC_CELL_WIDTH + GAP * 2) / 4) (BATTERY_CASE_THICKNESS / 2) (PHOTOVOLTAIC_CELL_LENGTH + GAP * 2) position -(((PHOTOVOLTAIC_CELL_WIDTH + GAP * 2) / 4) / (2 / 3)) } cube { size ((PHOTOVOLTAIC_CELL_WIDTH + GAP * 2) / 4) (BATTERY_CASE_THICKNESS / 2) (PHOTOVOLTAIC_CELL_LENGTH + GAP * 2) position (((PHOTOVOLTAIC_CELL_WIDTH + GAP * 2) / 4) / (2 / 3)) } position 0 -(BATTERY_CASE_THICKNESS / 4) } union { cylinder { orientation 0 0 0.5 size (CAPACITOR_DIAMETER + GAP * 2 + BATTERY_CASE_WALL_THICKNESS * 2) (BATTERY_CASE_LENGTH) position -(BATTERY_CASE_WIDTH / 4) } cylinder { orientation 0 0 0.5 size (CAPACITOR_DIAMETER + GAP * 2 + BATTERY_CASE_WALL_THICKNESS * 2) (BATTERY_CASE_LENGTH) position (BATTERY_CASE_WIDTH / 4) } } } /// Cutouts for photovoltaic wires union { cube { size (PHOTOVOLTAIC_WIRE_THICKNESS + GAP * 2) (BATTERY_CASE_THICKNESS / 2) (PHOTOVOLTAIC_WIRES_CUTOUTS_LENGTH) position -10 -(BATTERY_CASE_THICKNESS / 4) -(BATTERY_CASE_LENGTH / 2 - PHOTOVOLTAIC_WIRES_CUTOUTS_LENGTH / 2) } cube { size (PHOTOVOLTAIC_WIRE_THICKNESS + GAP * 2) (BATTERY_CASE_THICKNESS / 2) (PHOTOVOLTAIC_WIRES_CUTOUTS_LENGTH) position 10 -(BATTERY_CASE_THICKNESS / 4) -(BATTERY_CASE_LENGTH / 2 - PHOTOVOLTAIC_WIRES_CUTOUTS_LENGTH / 2) } } } } /// Slots for capacitors union { cylinder { orientation 0 0 0.5 size (CAPACITOR_DIAMETER + GAP * 2) (CAPACITOR_LENGTH + GAP * 2) position -(BATTERY_CASE_WIDTH / 4) } cylinder { orientation 0 0 0.5 size (CAPACITOR_DIAMETER + GAP * 2) (CAPACITOR_LENGTH + GAP * 2) position (BATTERY_CASE_WIDTH / 4) } cube { size (BATTERY_CASE_WIDTH / 2) (CAPACITOR_DIAMETER + GAP * 2) ((CAPACITOR_LENGTH + GAP * 2) / 3) position 0 0 -((CAPACITOR_LENGTH + GAP * 2) / 3) } position 0 0 (BATTERY_CASE_LENGTH / 2 - (CAPACITOR_LENGTH + GAP * 2) / 2 - BATTERY_CASE_WALL_THICKNESS) } /// Slot for terminals platform cube { size (TERMINALS_PLATFORM_WIDTH + GAP * 2) (TERMINALS_PLATFORM_LENGTH + GAP * 2) (TERMINALS_PLATFORM_THICKNESS + GAP * 2) position 0 0 -(BATTERY_CASE_LENGTH / 2 - (TERMINALS_PLATFORM_THICKNESS + GAP * 2) / 2) } /// Cutout for soldered connections define CUTOUT_DEPTH (BATTERY_CASE_LENGTH - BATTERY_CASE_WALL_THICKNESS - (CAPACITOR_LENGTH + GAP * 2) - (TERMINALS_PLATFORM_THICKNESS + GAP)) union { color 0 0 0 cylinder { orientation 0 0 0.5 size (CAPACITOR_DIAMETER + GAP * 2) (CUTOUT_DEPTH) position -(BATTERY_CASE_WIDTH / 4) } cylinder { orientation 0 0 0.5 size (CAPACITOR_DIAMETER + GAP * 2) (CUTOUT_DEPTH) position (BATTERY_CASE_WIDTH / 4) } cube { size (BATTERY_CASE_WIDTH / 2) (CAPACITOR_DIAMETER + GAP * 2) (CUTOUT_DEPTH) } position 0 0 -(BATTERY_CASE_LENGTH / 2 - (TERMINALS_PLATFORM_THICKNESS + GAP * 2) - CUTOUT_DEPTH / 2) } } } //////////////////////////////////////////////////////////////// BATTERY_CASE { name "9V Solar Battery Case" color 0.6 0.6 0.6 opacity 0.85 } /// Ghosts if SHOW_GHOSTS { opacity 0.5 /// Photovolatic cell(s) if PHOTOVOLTAIC_CELL_COUNT > 0 { cube { color 0 1 1 size PHOTOVOLTAIC_CELL_WIDTH PHOTOVOLTAIC_CELL_THICKNESS PHOTOVOLTAIC_CELL_LENGTH position 0 (BATTERY_CASE_THICKNESS / 2 - PHOTOVOLTAIC_CELL_THICKNESS / 2 - GAP) } if PHOTOVOLTAIC_CELL_COUNT > 1 { cube { color 0 1 1 size PHOTOVOLTAIC_CELL_WIDTH PHOTOVOLTAIC_CELL_THICKNESS PHOTOVOLTAIC_CELL_LENGTH position 0 -(BATTERY_CASE_THICKNESS / 2 - PHOTOVOLTAIC_CELL_THICKNESS / 2 - GAP) } } } /// Capacitors group { cylinder { detail (detail / 4) color 1 0 1 orientation 0 0 0.5 size (CAPACITOR_DIAMETER) (CAPACITOR_LENGTH) position -(BATTERY_CASE_WIDTH / 4) 0 (BATTERY_CASE_LENGTH / 2 - (CAPACITOR_LENGTH + GAP * 2) / 2 - BATTERY_CASE_WALL_THICKNESS) } cylinder { detail (detail / 4) color 1 0 1 orientation 0 0 0.5 size (CAPACITOR_DIAMETER) (CAPACITOR_LENGTH) position (BATTERY_CASE_WIDTH / 4) 0 (BATTERY_CASE_LENGTH / 2 - (CAPACITOR_LENGTH + GAP * 2) / 2 - BATTERY_CASE_WALL_THICKNESS) } } /// Terminals platform cube { color 1 0 0 size TERMINALS_PLATFORM_WIDTH TERMINALS_PLATFORM_LENGTH TERMINALS_PLATFORM_THICKNESS position 0 0 -(BATTERY_CASE_LENGTH / 2 - TERMINALS_PLATFORM_THICKNESS / 2) } } //////////////////////////////////////////////////////////////// print "[MODEL] detail: " (detail) print "" print "[BATTERY CASE] length: " (BATTERY_CASE_LENGTH) "mm" print "[BATTERY CASE] width: " (BATTERY_CASE_WIDTH) "mm" print "[BATTERY CASE] thickness: " (BATTERY_CASE_THICKNESS) "mm" print "" print "[PHOTOVOLTAIC CELL] length: " (PHOTOVOLTAIC_CELL_LENGTH) "mm" print "[PHOTOVOLTAIC CELL] width: " (PHOTOVOLTAIC_CELL_WIDTH) "mm" print "[PHOTOVOLTAIC CELL] thickness: " (PHOTOVOLTAIC_CELL_THICKNESS) "mm" print "[PHOTOVOLTAIC CELL] count: " (PHOTOVOLTAIC_CELL_COUNT)